= navbar style: 'margin-bottom: 5px;' do
  = navbar_header brand: t(:app_name), brand_link: root_url
  = navbar_collapse do
    = navbar_group id: 'menu' do
      - if user_signed_in?
        = navbar_item '销售记录', sales_path
        = navbar_item '客户', customers_path
        = navbar_item '产品', products_path
        = navbar_item '员工', staffs_path
        = navbar_item '设置', site_configs_path if can? :manage, SiteConfig
    = navbar_group align: 'right' do
      - if user_signed_in? # check if user is logged in, maybe like "if current_user.present?"
        = navbar_text "欢迎  #{current_user.name_or_email}"
        = navbar_item '个人设置', profile_staffs_path
        = navbar_item '修改密码', password_staff_path(current_user)
        = navbar_item "退出", destroy_user_session_path, {}, 'data-method' => :delete
      - else
        = navbar_item "登陆", new_user_session_path